<?php
/**
 * 注册账号提交用户登录信息接口校验类
 * User: 苏近之
 * Date: 2019-03-24
 * Time: 01:02
 */

namespace app\user\validator;

use app\common\base\ApiValidator;

class PersonAccountSubmitUserLoginInfo extends ApiValidator
{
    protected $rule = [
        'phone' => 'require|mobile',
        'token' => 'require|alphaNum',
        'registerName' => 'require|chsDash|length:3,20',
        'password' => 'require|length:6,20',
    ];

    protected $message = [
        'phone.require' => '手机号必填',
        'phone.mobile' => '手机号格式不正确',
        'token' => '请求参数校验失败',
        'registerName.require' => '用户名必填',
        'registerName.chsDash' => '用户名必须是中文、英文、数字、“-”、“_”的组合',
        'registerLength' => '用户名必须在 4 到 20 个字符以内',
        'password.require' => '密码必填',
        'password.length' => '密码必须在 6 到 20 个字符以内',
    ];
}